package org.zj.webview.type;

/**
 * @author zj
 * @since 2025/7/27
 */
class StringUtils {
    private StringUtils() {
    }

    /**
     * @param cs
     * @return
     */
    static boolean isBlank(CharSequence cs) {
        if(cs == null || cs.length() == 0) {
            return true;
        }
        for (int i = 0; i < cs.length(); i++) {
            if (!Character.isWhitespace(cs.charAt(i))) {
                return false;
            }
        }
        return true;
    }


    /**
     * @param cs
     * @return
     */
    static boolean isAnyBlank(CharSequence... cs) {
        for (CharSequence c : cs) {
            if (isBlank(c)) {
                return true;
            }
        }
        return false;
    }
}
